Skip to content

Conversation

NathalieCharbel
Copy link
Contributor

Description

This PR extends the rate limiting functionality (previously available only for LLMs) to all embedding providers, and ensures consistent error handling

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Documentation update
  • Project configuration change

Complexity

Low

Complexity:

How Has This Been Tested?

  • Unit tests
  • E2E tests
  • Manual tests

Checklist

The following requirements should have been met (depending on the changes in the branch):

  • Documentation has been updated
  • Unit tests have been updated
  • E2E tests have been updated
  • Examples have been updated
  • New files have copyright header
  • CLA (https://neo4j.com/developer/cla/) has been signed
  • CHANGELOG.md updated if appropriate

@NathalieCharbel NathalieCharbel requested a review from a team as a code owner September 20, 2025 18:08
Copy link
Contributor

@stellasia stellasia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just worried about the tests, if you have some time to explain. The other comments are marginal and non blocking.


def is_rate_limit_error(exception: Exception) -> bool:
"""Check if an exception is a rate limit error from any LLM provider.
"""Check if an exception is a rate limit error from any LLM provider or embedder.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we can move this file somewhere else now that it's not only used for LLMs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, I thought about that, but it would be a breaking change. unless we believe most people aren’t calling the rate limit handler directly and are just relying on the default one. I’m fine with moving it, but I wanted to point out the potential drawback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants